﻿using System;

namespace MessagePack.Formatters
{
	// Token: 0x02000056 RID: 86
	public class NullableStringFormatter : IMessagePackFormatter<string>
	{
		// Token: 0x06000147 RID: 327 RVA: 0x00005725 File Offset: 0x00003B25
		private NullableStringFormatter()
		{
		}

		// Token: 0x06000148 RID: 328 RVA: 0x0000572D File Offset: 0x00003B2D
		public int Serialize(ref byte[] bytes, int offset, string value, IFormatterResolver typeResolver)
		{
			return MessagePackBinary.WriteString(ref bytes, offset, value);
		}

		// Token: 0x06000149 RID: 329 RVA: 0x00005737 File Offset: 0x00003B37
		public string Deserialize(byte[] bytes, int offset, IFormatterResolver typeResolver, out int readSize)
		{
			return MessagePackBinary.ReadString(bytes, offset, out readSize);
		}

		// Token: 0x0400004B RID: 75
		public static readonly NullableStringFormatter Instance = new NullableStringFormatter();
	}
}
